package utils

import "github.com/bwmarrin/snowflake"

var node *snowflake.Node
var unid int64 = 1

func CreateUid() int64 {
	var err error
	node, err = snowflake.NewNode(unid)
	if err != nil {
		panic(err)
	}
	return node.Generate().Int64()
}
